Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current modification implements local storage for the selected theme using an event listener. This ensures that the chosen theme persists even when users leave and return to the site. By default, the website adopts a white theme, but users can change it. The selected theme should remain fixed upon subsequent visits.
For the theme selection, I've utilized default Windows emojis for the Sun and moon icons, enhancing the visual appeal. Notably, I've maintained a visible border on the icon to signify its selectability.
There don't seem to be any performance issues, but there's a minor inconvenience where the page initially loads with a white theme before flickering to the selected theme. This may be more noticeable on slower internet connections, potentially revealing the behind-the-scenes of the website. Whether this is a significant issue is open to discussion.
Key changes can be found in the following files:
3 Head.html: Modifies stylesheets and introduces a script for the default "just the docs" theme.js, essentially fixing it to the original code.
Issues
The following issues are as listed:
Fixes
It would be possible to force load stylesheets globally so that the theme changes it for the entire site, but it has underlying issues with the way ruby website is setup and might need internal code changes.